import java.util.Scanner;

public class 实验五把任意字符串加入最小的字符串使之成为回文串 {

    /**
     * 是否为回文串
     *
     * @return
     */
    public static boolean palindromeString(String str) {
        int length = str.length();

        for (int i = 0, j = length - 1; i <= j; i++, j--) {

            if (str.charAt(i) != str.charAt(j)) {
                return false;
            }

        }

        return true;
    }

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.next();

            if(palindromeString(str)){
                System.out.printf("%s本身就是一个回文串\n",str);
            }else {
                StringBuilder sb = new StringBuilder(str.substring(0, str.length() - 1));
                sb.reverse();
                System.out.printf("%s 加入 %s 成为回文串 %s\n",str,sb.toString(),str + sb.toString());
            }
        }
    }
}
